<%@page import="com.core.utils.LocalizableString"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@page import="com.entities.projecttask.detail.TaskDetailController"%>
<%@page import="com.entities.projecttask.actionscript.ActionScriptParserTaskDescription"%>
<%@page import="com.entities.projectitem.actionscript.ActionScriptParserProjectDescription"%>
<%@page import="com.core.ui.controller.ActionBarController"%>
<%@page import="com.entities.projectitem.detail.ProjectDetailController"%>

<%@page import="com.core.utils.RecordState"%>

<%@page import="java.util.List"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link type="text/css" rel="stylesheet" href="css/header.css">
<link type="text/css" rel="stylesheet" href="css/menu.css">
<link type="text/css" rel="stylesheet" href="css/maincontainer.css">
<link type="text/css" rel="stylesheet" href="css/navigator.css">
<link type="text/css" rel="stylesheet" href="css/tableview.css">
<link type="text/css" rel="stylesheet" href="css/detailsview.css">
<link type="text/css" rel="stylesheet" href="css/actionbar.css">
<script type="text/javascript" src="js/jQuery/1.6.4/jquery.min.js"></script>

</head>

<%@taglib prefix="sorokina" uri="/WEB-INF/Sorokina.tld"%>

<body>


    <jsp:useBean id="stackNavigatorController" class="com.core.ui.controller.StackNavigatorController" scope="session" />

    <%
        String objectId = request.getParameter("id");

        ActionScriptParserTaskDescription taskDescriptionActionScriptParser = new ActionScriptParserTaskDescription();
        taskDescriptionActionScriptParser.setTaskId(objectId);

        TaskDetailController taskItemController = new TaskDetailController();
        taskItemController.setEditMode(RecordState.Mode.OPEN);
        taskItemController.setTaskId(objectId);
        taskItemController.reloadData();

        LocalizableString localizableString = LocalizableString.sharedInstance();
        String details = localizableString.localizable("view.description.field.details");
        String people = localizableString.localizable("view.description.field.people");
        String dates = localizableString.localizable("view.description.field.dates");
        String attributes = localizableString.localizable("view.description.field.attributes");

        ActionBarController actionBarController = new ActionBarController();
        actionBarController.setActionScriptParser(taskDescriptionActionScriptParser);
    %>

    <div class="maincontainer">
        <div class="datacontainer" id="datacountainer">

            <div class="content">
                <div class="module">
                    <sorokina:ActionBarView datasource="<%=actionBarController %>" />
                </div>
            </div>

            <div class="primary_container_75">
                <div class="content">

                    <div class="module">
                        <div class="mod-header">
                            <h3 class="toggle-title"><%=details %></h3>
                        </div>
                        <sorokina:DetailTableView delegate="<%= taskItemController%>" userInfo="BASE" tableClass="properties-list-two-columns" />
                    </div>

                    <div class="module">
                        <div class="mod-header">
                            <h3 class="toggle-title"><%=attributes %></h3>
                        </div>
                        <sorokina:DetailTableView delegate="<%= taskItemController%>" userInfo="ATTRIBUTES" tableClass="properties-list-two-columns" />
                    </div>


                </div>


            </div>

            <div class="secondary_container">

                <div class="content">
                    <div class="module">
                        <div class="mod-header">
                            <h3 class="toggle-title"><%=people %></h3>
                        </div>
                        <sorokina:DetailTableView delegate="<%= taskItemController%>" userInfo="PEOPLE" tableClass="properties-list-two-columns" />
                    </div>

                </div>
                <%--

Dates
 --%>
                <div class="content">
                    <div class="module">
                        <div class="mod-header">
                            <h3 class="toggle-title"><%=dates %></h3>
                        </div>
                        <sorokina:DetailTableView delegate="<%= taskItemController%>" userInfo="DATES" tableClass="properties-list-two-columns" />
                    </div>

                </div>


            </div>
        </div>
    </div>
</body>
</html>